package com.db.concurrent;

import java.util.concurrent.TimeUnit;

public class PoolFactoryRealization<T> implements PoolFactory<T> {

    @Override
    public ConnectionPool<T> newConnectionPool(int capacity, ConnectionSource<T> src) {
        return new ConnectionPoolRealization<>(capacity, capacity, 0l, TimeUnit.SECONDS, src);
    }

    @Override
    public ConnectionPool<T> newConnectionPool(int init, int max, long keepAliveTime, TimeUnit unit, ConnectionSource<T> src) {
        return new ConnectionPoolRealization<>(init, max, keepAliveTime, unit, src);
    }
}
